package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * MemberPromote entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_MEMBER_PROMOTE", schema = "HCD_DEV")
public class MemberPromote extends Entity implements java.io.Serializable {

	// Fields

	private Long promoteId;
	private Company company;
	private Integer type;
	private Float prepaid;
	private Float give;

	// Constructors

	/** default constructor */
	public MemberPromote() {
	}

	/** minimal constructor */
	public MemberPromote(Integer type, Float prepaid, Float give) {
		this.type = type;
		this.prepaid = prepaid;
		this.give = give;
	}

	/** full constructor */
	public MemberPromote(Company company, Integer type, Float prepaid, Float give) {
		this.company = company;
		this.type = type;
		this.prepaid = prepaid;
		this.give = give;
	}

	// Property accessors
	@SequenceGenerator(name = "generator", sequenceName = "SEQ_MEMBER_PROMOTE")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "PROMOTE_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getPromoteId() {
		return this.promoteId;
	}

	public void setPromoteId(Long promoteId) {
		this.promoteId = promoteId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "COMPANY_ID")
	public Company getCompany() {
		return this.company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	@Column(name = "TYPE", nullable = false, precision = 2, scale = 0)
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "PREPAID", nullable = false, precision = 8)
	public Float getPrepaid() {
		return this.prepaid;
	}

	public void setPrepaid(Float prepaid) {
		this.prepaid = prepaid;
	}

	@Column(name = "GIVE", nullable = false, precision = 8)
	public Float getGive() {
		return this.give;
	}

	public void setGive(Float give) {
		this.give = give;
	}

}